<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\vsl\vreturn\service;

class GetReturnDetailInfo {
	
	static $_TSPEC;
	public $transaction_id = null;
	public $box_id = null;
	public $po_no = null;
	public $brand_id = null;
	public $item_code = null;
	public $item_name = null;
	public $grade = null;
	public $type = null;
	public $qty = null;
	public $order_sn = null;
	public $receipt_no = null;
	public $purchase_case_no = null;
	public $reference_no = null;
	public $work_number = null;
	public $is_jitx = null;
	public $location_code = null;
	public $batch_no = null;
	public $origin_order_sn = null;
	public $origin_order_no = null;
	public $origin_container_no = null;
	public $relation_so = null;
	public $unique_code = null;
	public $unique_code_type = null;
	public $unique_code_material = null;
	public $origin_po_no = null;
	public $origin_return_no = null;
	public $difference_no = null;
	public $after_sales_no = null;
	public $after_sales_container = null;
	public $vip_delivery_no = null;
	public $vip_delivery_container = null;
	public $origin_item_code = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			1 => array(
			'var' => 'transaction_id'
			),
			2 => array(
			'var' => 'box_id'
			),
			3 => array(
			'var' => 'po_no'
			),
			4 => array(
			'var' => 'brand_id'
			),
			5 => array(
			'var' => 'item_code'
			),
			6 => array(
			'var' => 'item_name'
			),
			7 => array(
			'var' => 'grade'
			),
			8 => array(
			'var' => 'type'
			),
			9 => array(
			'var' => 'qty'
			),
			10 => array(
			'var' => 'order_sn'
			),
			11 => array(
			'var' => 'receipt_no'
			),
			12 => array(
			'var' => 'purchase_case_no'
			),
			13 => array(
			'var' => 'reference_no'
			),
			14 => array(
			'var' => 'work_number'
			),
			15 => array(
			'var' => 'is_jitx'
			),
			16 => array(
			'var' => 'location_code'
			),
			17 => array(
			'var' => 'batch_no'
			),
			18 => array(
			'var' => 'origin_order_sn'
			),
			19 => array(
			'var' => 'origin_order_no'
			),
			20 => array(
			'var' => 'origin_container_no'
			),
			21 => array(
			'var' => 'relation_so'
			),
			22 => array(
			'var' => 'unique_code'
			),
			23 => array(
			'var' => 'unique_code_type'
			),
			24 => array(
			'var' => 'unique_code_material'
			),
			25 => array(
			'var' => 'origin_po_no'
			),
			26 => array(
			'var' => 'origin_return_no'
			),
			27 => array(
			'var' => 'difference_no'
			),
			28 => array(
			'var' => 'after_sales_no'
			),
			29 => array(
			'var' => 'after_sales_container'
			),
			30 => array(
			'var' => 'vip_delivery_no'
			),
			31 => array(
			'var' => 'vip_delivery_container'
			),
			32 => array(
			'var' => 'origin_item_code'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['transaction_id'])){
				
				$this->transaction_id = $vals['transaction_id'];
			}
			
			
			if (isset($vals['box_id'])){
				
				$this->box_id = $vals['box_id'];
			}
			
			
			if (isset($vals['po_no'])){
				
				$this->po_no = $vals['po_no'];
			}
			
			
			if (isset($vals['brand_id'])){
				
				$this->brand_id = $vals['brand_id'];
			}
			
			
			if (isset($vals['item_code'])){
				
				$this->item_code = $vals['item_code'];
			}
			
			
			if (isset($vals['item_name'])){
				
				$this->item_name = $vals['item_name'];
			}
			
			
			if (isset($vals['grade'])){
				
				$this->grade = $vals['grade'];
			}
			
			
			if (isset($vals['type'])){
				
				$this->type = $vals['type'];
			}
			
			
			if (isset($vals['qty'])){
				
				$this->qty = $vals['qty'];
			}
			
			
			if (isset($vals['order_sn'])){
				
				$this->order_sn = $vals['order_sn'];
			}
			
			
			if (isset($vals['receipt_no'])){
				
				$this->receipt_no = $vals['receipt_no'];
			}
			
			
			if (isset($vals['purchase_case_no'])){
				
				$this->purchase_case_no = $vals['purchase_case_no'];
			}
			
			
			if (isset($vals['reference_no'])){
				
				$this->reference_no = $vals['reference_no'];
			}
			
			
			if (isset($vals['work_number'])){
				
				$this->work_number = $vals['work_number'];
			}
			
			
			if (isset($vals['is_jitx'])){
				
				$this->is_jitx = $vals['is_jitx'];
			}
			
			
			if (isset($vals['location_code'])){
				
				$this->location_code = $vals['location_code'];
			}
			
			
			if (isset($vals['batch_no'])){
				
				$this->batch_no = $vals['batch_no'];
			}
			
			
			if (isset($vals['origin_order_sn'])){
				
				$this->origin_order_sn = $vals['origin_order_sn'];
			}
			
			
			if (isset($vals['origin_order_no'])){
				
				$this->origin_order_no = $vals['origin_order_no'];
			}
			
			
			if (isset($vals['origin_container_no'])){
				
				$this->origin_container_no = $vals['origin_container_no'];
			}
			
			
			if (isset($vals['relation_so'])){
				
				$this->relation_so = $vals['relation_so'];
			}
			
			
			if (isset($vals['unique_code'])){
				
				$this->unique_code = $vals['unique_code'];
			}
			
			
			if (isset($vals['unique_code_type'])){
				
				$this->unique_code_type = $vals['unique_code_type'];
			}
			
			
			if (isset($vals['unique_code_material'])){
				
				$this->unique_code_material = $vals['unique_code_material'];
			}
			
			
			if (isset($vals['origin_po_no'])){
				
				$this->origin_po_no = $vals['origin_po_no'];
			}
			
			
			if (isset($vals['origin_return_no'])){
				
				$this->origin_return_no = $vals['origin_return_no'];
			}
			
			
			if (isset($vals['difference_no'])){
				
				$this->difference_no = $vals['difference_no'];
			}
			
			
			if (isset($vals['after_sales_no'])){
				
				$this->after_sales_no = $vals['after_sales_no'];
			}
			
			
			if (isset($vals['after_sales_container'])){
				
				$this->after_sales_container = $vals['after_sales_container'];
			}
			
			
			if (isset($vals['vip_delivery_no'])){
				
				$this->vip_delivery_no = $vals['vip_delivery_no'];
			}
			
			
			if (isset($vals['vip_delivery_container'])){
				
				$this->vip_delivery_container = $vals['vip_delivery_container'];
			}
			
			
			if (isset($vals['origin_item_code'])){
				
				$this->origin_item_code = $vals['origin_item_code'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'GetReturnDetailInfo';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("transaction_id" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->transaction_id);
				
			}
			
			
			
			
			if ("box_id" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->box_id);
				
			}
			
			
			
			
			if ("po_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->po_no);
				
			}
			
			
			
			
			if ("brand_id" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->brand_id);
				
			}
			
			
			
			
			if ("item_code" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->item_code);
				
			}
			
			
			
			
			if ("item_name" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->item_name);
				
			}
			
			
			
			
			if ("grade" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->grade); 
				
			}
			
			
			
			
			if ("type" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->type);
				
			}
			
			
			
			
			if ("qty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->qty); 
				
			}
			
			
			
			
			if ("order_sn" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->order_sn);
				
			}
			
			
			
			
			if ("receipt_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->receipt_no);
				
			}
			
			
			
			
			if ("purchase_case_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->purchase_case_no);
				
			}
			
			
			
			
			if ("reference_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->reference_no);
				
			}
			
			
			
			
			if ("work_number" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->work_number);
				
			}
			
			
			
			
			if ("is_jitx" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->is_jitx);
				
			}
			
			
			
			
			if ("location_code" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->location_code);
				
			}
			
			
			
			
			if ("batch_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->batch_no);
				
			}
			
			
			
			
			if ("origin_order_sn" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->origin_order_sn);
				
			}
			
			
			
			
			if ("origin_order_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->origin_order_no);
				
			}
			
			
			
			
			if ("origin_container_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->origin_container_no);
				
			}
			
			
			
			
			if ("relation_so" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->relation_so);
				
			}
			
			
			
			
			if ("unique_code" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->unique_code);
				
			}
			
			
			
			
			if ("unique_code_type" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->unique_code_type);
				
			}
			
			
			
			
			if ("unique_code_material" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->unique_code_material);
				
			}
			
			
			
			
			if ("origin_po_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->origin_po_no);
				
			}
			
			
			
			
			if ("origin_return_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->origin_return_no);
				
			}
			
			
			
			
			if ("difference_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->difference_no);
				
			}
			
			
			
			
			if ("after_sales_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->after_sales_no);
				
			}
			
			
			
			
			if ("after_sales_container" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->after_sales_container);
				
			}
			
			
			
			
			if ("vip_delivery_no" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->vip_delivery_no);
				
			}
			
			
			
			
			if ("vip_delivery_container" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->vip_delivery_container);
				
			}
			
			
			
			
			if ("origin_item_code" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->origin_item_code);
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		if($this->transaction_id !== null) {
			
			$xfer += $output->writeFieldBegin('transaction_id');
			$xfer += $output->writeString($this->transaction_id);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->box_id !== null) {
			
			$xfer += $output->writeFieldBegin('box_id');
			$xfer += $output->writeString($this->box_id);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->po_no !== null) {
			
			$xfer += $output->writeFieldBegin('po_no');
			$xfer += $output->writeString($this->po_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->brand_id !== null) {
			
			$xfer += $output->writeFieldBegin('brand_id');
			$xfer += $output->writeString($this->brand_id);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->item_code !== null) {
			
			$xfer += $output->writeFieldBegin('item_code');
			$xfer += $output->writeString($this->item_code);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->item_name !== null) {
			
			$xfer += $output->writeFieldBegin('item_name');
			$xfer += $output->writeString($this->item_name);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->grade !== null) {
			
			$xfer += $output->writeFieldBegin('grade');
			$xfer += $output->writeI32($this->grade);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->type !== null) {
			
			$xfer += $output->writeFieldBegin('type');
			$xfer += $output->writeString($this->type);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->qty !== null) {
			
			$xfer += $output->writeFieldBegin('qty');
			$xfer += $output->writeI32($this->qty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->order_sn !== null) {
			
			$xfer += $output->writeFieldBegin('order_sn');
			$xfer += $output->writeString($this->order_sn);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->receipt_no !== null) {
			
			$xfer += $output->writeFieldBegin('receipt_no');
			$xfer += $output->writeString($this->receipt_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->purchase_case_no !== null) {
			
			$xfer += $output->writeFieldBegin('purchase_case_no');
			$xfer += $output->writeString($this->purchase_case_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->reference_no !== null) {
			
			$xfer += $output->writeFieldBegin('reference_no');
			$xfer += $output->writeString($this->reference_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->work_number !== null) {
			
			$xfer += $output->writeFieldBegin('work_number');
			$xfer += $output->writeString($this->work_number);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->is_jitx !== null) {
			
			$xfer += $output->writeFieldBegin('is_jitx');
			$xfer += $output->writeString($this->is_jitx);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->location_code !== null) {
			
			$xfer += $output->writeFieldBegin('location_code');
			$xfer += $output->writeString($this->location_code);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->batch_no !== null) {
			
			$xfer += $output->writeFieldBegin('batch_no');
			$xfer += $output->writeString($this->batch_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->origin_order_sn !== null) {
			
			$xfer += $output->writeFieldBegin('origin_order_sn');
			$xfer += $output->writeString($this->origin_order_sn);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->origin_order_no !== null) {
			
			$xfer += $output->writeFieldBegin('origin_order_no');
			$xfer += $output->writeString($this->origin_order_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->origin_container_no !== null) {
			
			$xfer += $output->writeFieldBegin('origin_container_no');
			$xfer += $output->writeString($this->origin_container_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->relation_so !== null) {
			
			$xfer += $output->writeFieldBegin('relation_so');
			$xfer += $output->writeString($this->relation_so);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->unique_code !== null) {
			
			$xfer += $output->writeFieldBegin('unique_code');
			$xfer += $output->writeString($this->unique_code);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->unique_code_type !== null) {
			
			$xfer += $output->writeFieldBegin('unique_code_type');
			$xfer += $output->writeString($this->unique_code_type);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->unique_code_material !== null) {
			
			$xfer += $output->writeFieldBegin('unique_code_material');
			$xfer += $output->writeString($this->unique_code_material);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->origin_po_no !== null) {
			
			$xfer += $output->writeFieldBegin('origin_po_no');
			$xfer += $output->writeString($this->origin_po_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->origin_return_no !== null) {
			
			$xfer += $output->writeFieldBegin('origin_return_no');
			$xfer += $output->writeString($this->origin_return_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->difference_no !== null) {
			
			$xfer += $output->writeFieldBegin('difference_no');
			$xfer += $output->writeString($this->difference_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->after_sales_no !== null) {
			
			$xfer += $output->writeFieldBegin('after_sales_no');
			$xfer += $output->writeString($this->after_sales_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->after_sales_container !== null) {
			
			$xfer += $output->writeFieldBegin('after_sales_container');
			$xfer += $output->writeString($this->after_sales_container);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->vip_delivery_no !== null) {
			
			$xfer += $output->writeFieldBegin('vip_delivery_no');
			$xfer += $output->writeString($this->vip_delivery_no);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->vip_delivery_container !== null) {
			
			$xfer += $output->writeFieldBegin('vip_delivery_container');
			$xfer += $output->writeString($this->vip_delivery_container);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->origin_item_code !== null) {
			
			$xfer += $output->writeFieldBegin('origin_item_code');
			$xfer += $output->writeString($this->origin_item_code);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>